from odoo import models, fields


class TrainFeedback(models.Model):
    _name = 'train.feedback'
    _description = 'some feedback of the trains'

    name = fields.Many2one(
        'train.info',
        string='培训主题',
        required=True,
        readonly=True,
        ondelete='set null'
    )
    person = fields.Char(
        string='培训人',
        related='name.name.name',
        readonly=True
    )

    train_content = fields.Html(
        '反馈内容',
        required=True
    )